<html>
<head>
    <title>下班了</title>
    <meta http-equiv="Content-Type"content="text/html;charset=utf-8"/>
</head>
<body style="text-align: center; margin-top: 100px;font-size:60px">
    距离今天18点下班<br/>还有：<b><span style="color:darkblue"></span>.<span style="color:#c7254e"></span></b> 秒!!!
    <script type="text/javascript">
        var end = 18 * 60 * 60;
        var code = setInterval(function() {
            var now = new Date();
            var milliseconds = now.getMilliseconds();
            now = now.getHours() * 60 * 60
                + now.getMinutes() * 60
                + now.getSeconds() + 1;
            var millisecondsDiffer = '000' + (1000 - milliseconds);
            if(end - now >= 0) {
                document.getElementsByTagName('span')[0].innerHTML
                    = end - now;
                document.getElementsByTagName('span')[1].innerHTML
                    = millisecondsDiffer.substring(millisecondsDiffer.length - 3, millisecondsDiffer.length);
            } else {
                clearInterval(code);
                document.getElementsByTagName('body')[0].innerHTML
                    = "已经下班啦！快跑吧吧！";
            }
        }, 1);
    </script>
</body>
</html>